Skip to content

docs: accept RFC-0038 (collection permalinks) and RFC-0039 (site archives), ADR-0040/0041 - #61

Merged
Madraka merged 2 commits into
mainfrom
docs/rfc-collections-and-bundles
Oct 22, 2026
Merged

Madraka merged 2 commits into
mainfrom
docs/rfc-collections-and-bundles

Conversation

@Madraka

@Madraka Madraka commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Both RFCs are Accepted (decided by Halil, 2026-10-22), revised before acceptance after a comparison with other platforms, and recorded as ADR-0040 and ADR-0041.

RFC-0038: Collection permalinks → ADR-0040 (#50)

  • Site.collections.<key>.permalink, default /<collection>/{slug}. v1 accepts only fixed segments plus /{slug} (schema pattern), with a closed token set. Named permalink, not basePath, so tokens come later without a rename (WordPress, Ghost and Hugo all ended up with templates).
  • entryPath(site, entry) and entryAt(site, path) in core-ts replace about 15 inline copies.
  • Redirects come from the change: a prefix 301 in v1; per-entry old→new once there are tokens (the WordPress old-slug / Hugo aliases model).
  • Collisions are refused at write.
  • Later, decided: date tokens from a fixed first-publication date, per-locale templates, entries at the root, indexPath, {category}.

RFC-0039: Site archives → ADR-0041 (#47)

  • cloudhal export / import with a .cloudhal file: a gzipped ustar of nodes|snapshots|blobs/NNNN.ndjson parts (≤ 8 MB, streaming like Sanity and Strapi), media/<sha256>, project.json, ledger.ndjson. Read back in order, the parts are exactly a cloudhal.site-bundle@1.
  • The manifest carries the format, the contracts' schemaVersion, and every file's SHA-256 and size. Newer versions are refused; older ones are migrated forward.
  • Ids are kept. Modes: bootstrap (default), --replace (takes a before import snapshot first; never erase-then-import like Strapi), and --dry-run with a diff.
  • Graph only: no people, comments, analytics, audit, secrets or webhook credentials. Hence no built-in encryption (Strapi's AES-ECB shows the risk); pipe through age/gpg instead.
  • Deterministic bytes; a closed path layout against traversal.
  • Later, decided: init --from, --new-ids, partial export, --from <admin-url>, Studio download, signing.

🤖 Generated with Claude Code

RFC-0038 (#50): an optional base path per collection in the site
(`Site.collections.<key>.basePath`, default `/<collection>`), one
`entryPath` for the ~15 inline copies, and a prefix redirect when it
changes, as taxonomy archives already do.

RFC-0039 (#47): `cloudhal export` / `cloudhal import` with a
`.cloudhal` file: a gzipped tar of a manifest, the existing SiteBundle
JSON and the media bytes; keeps the site id; graph only, no people or
personal data.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka Madraka added the rfc A design proposal in docs/rfcs label Oct 21, 2026
…ives)

Revised before acceptance after comparing WordPress, Ghost, Hugo, Webflow,
Eleventy and the headless CMSs (URLs), and Sanity, Strapi, Contentful,
Ghost, WordPress, Directus and Webflow (exports):

- RFC-0038: `permalink` (closed token set, v1 `/<prefix>/{slug}`) instead
  of `basePath`, so tokens can come without a rename; `entryPath`/`entryAt`
  both ways; redirects derived from the change; later items decided.
- RFC-0039: NDJSON parts instead of one bundle.json (streaming), per-file
  SHA-256 and contract versions in the manifest, a `before import` snapshot
  for `--replace`, no built-in encryption; later items decided.
- ADR-0040, ADR-0041.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka Madraka changed the title docs(rfc): RFC-0038 collection base paths, RFC-0039 site archives docs: accept RFC-0038 (collection permalinks) and RFC-0039 (site archives), ADR-0040/0041 Oct 22, 2026
@Madraka
Madraka merged commit 0304f18 into main Oct 22, 2026
4 checks passed
@Madraka
Madraka deleted the docs/rfc-collections-and-bundles branch October 22, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfc A design proposal in docs/rfcs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant